﻿//using NotifyForCreateProject;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TestReflactor
{
    internal class Program
    {
        static void Main(string[] args)
        {
            //var type1 = Type.GetType($"{typeof(HandleAtProjCreated_01).FullName},{typeof(HandleAtProjCreated_01).Assembly.FullName}");
            //var type2 = Type.GetType($"{typeof(HandleAtProjCreated_01).FullName},{typeof(HandleAtProjCreated_01).Assembly.GetName().Name}");
            var type3 = Type.GetType($"NotifyForCreateProject.HandleAtProjCreated_01,NotifyForCreateProject");
            // var instance = System.Activator.CreateInstance(type1,);

            System.Reflection.Assembly.GetExecutingAssembly();
            var currAssembly = System.Reflection.Assembly.GetEntryAssembly();
            var theAssembly = System.Reflection.Assembly.LoadFile(System.IO.Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, "lib", "NotifyForCreateProject.exe"));
            var type4 = theAssembly.GetType("NotifyForCreateProject.HandleAtProjCreated_01");
            var instance = theAssembly.CreateInstance("NotifyForCreateProject.HandleAtProjCreated_01");
            var instance2 = System.Activator.CreateInstance(theAssembly.FullName, "NotifyForCreateProject.HandleAtProjCreated_01");

            Console.ReadKey();
        }
    }
}
